import {
    post,
    get
} from './http.js'
import Qs from 'qs'

export const getAll = params => {
    return get('url', {
        params
    })
}

// ----------------------------------------------------------图片路径

export const imgUrl = "https://www.gmc8888.com"

// ----------------------------------------------------------图片路径

// ----------------------------------------------------------公共-获取配置信息接口开始

// 获取配置信息接口
export const getConfig = params => {
    return post('/api/index/get_siteconfig', Qs.stringify(params))
}

// 上传图片接口
export const upLoad = params => {
    return post('/api/common/upload', params)
}

// ----------------------------------------------------------公共-获取配置信息接口结束



// ----------------------------------------------------------未知接口开始

export const unknown = params => {
    return post('/api/Crontab/add_goods', params)
}

// ----------------------------------------------------------未知接口结束





// ----------------------------------------------------------登录接口开始

// 请求登录
export const getLogin = params => {
    return post('/api/user/login', Qs.stringify(params))
}

// 注册请求
export const setUser = params => {
    return post('/api/user/register', Qs.stringify(params))
}

// 发送验证码
export const smsSend = params => {
    return post('/api/sms/send', Qs.stringify(params))
}

// 重置密码
export const addResetpwd = params => {
    return post('/api/user/resetpwd', Qs.stringify(params))
}

// ----------------------------------------------------------登录接口结束



// ----------------------------------------------------------个人中心接口开始

// 数据统计接口
export const getTongJiInfo = params => {
    return post('/api/usercenter/tongji', Qs.stringify(params))
}

// 获取用户信息接口
export const getUserInfo = params => {
    return post('/api/usercenter/get_user_info', Qs.stringify(params))
}

// 获取总业绩接口
export const getUserTotal = params => {
    return post('/api/usercenter/zyj', Qs.stringify(params))
}

// ----------------------------------------------------------个人中心接口结束



// ----------------------------------------------------------我的钱包接口开始

// 提现申请接口
export const applyWithdrawal = params => {
    return post('/api/usercenter/tixian', Qs.stringify(params))
}

// 账户明细接口
export const getDetailed = params => {
    return post('/api/usercenter/money_log', Qs.stringify(params))
}

// 银行卡列表接口
export const getCard = params => {
    return post('/api/usercenter/bank_list', Qs.stringify(params))
}

// 银行卡详情接口
export const getCardInfo = params => {
    return post('/api/usercenter/get_bank', Qs.stringify(params))
}

// 添加银行卡接口
export const addCard = params => {
    return post('/api/usercenter/add_bank', Qs.stringify(params))
}

// 修改银行卡接口
export const modifyCard = params => {
    return post('/api/usercenter/up_bank', Qs.stringify(params))
}

// ----------------------------------------------------------我的钱包接口结束








// ----------------------------------------------------------产品列表接口开始

// 产品列表接口
export const getGoodsList = params => {
    return post('/api/goods/goods_list', Qs.stringify(params))
}

// 产品搜索列表接口
export const searchGoods = params => {
    return post('/api/goods/search_goods', Qs.stringify(params))
}

// 产品详情接口
export const getGoodsInfo = params => {
    return post('/api/goods/goods_view', Qs.stringify(params))
}

// ----------------------------------------------------------产品列表接口结束




// ----------------------------------------------------------抢购记录接口开始

// 订单列表接口
export const getOrderList = params => {
    return post('/api/orders/order_list', Qs.stringify(params))
}

// 添加订单接口
export const addOrder = params => {
    return post('/api/orders/add_order', Qs.stringify(params))
}

// 删除订单接口
export const delOrder = params => {
    return post('/api/orders/del_order', Qs.stringify(params))
}

// 获取订单详情接口
export const getOrder = params => {
    return post('/api/orders/get_order', Qs.stringify(params))
}

// 上传凭证接口
export const upPingzheng = params => {
    return post('/api/orders/up_pingzheng', Qs.stringify(params))
}

// ----------------------------------------------------------抢购记录接口结束





// ----------------------------------------------------------我的商品接口开始

// 商品列表接口
export const getMyGoodsList = params => {
    return post('/api/mygoods/goods_list', Qs.stringify(params))
}

// 详情接口
export const getGoodInfo = params => {
    return post('/api/mygoods/goods_view', Qs.stringify(params))
}

// 上架接口
export const upGood = params => {
    return post('/api/mygoods/shangjia', Qs.stringify(params))
}

// 取消上架
export const lowerGood = params => {
    return post('/api/mygoods/xiajia', Qs.stringify(params))
}

// 删除订单接口
export const delGoods = params => {
    return post('/api/mygoods/del_goods', Qs.stringify(params))
}

// 取消审核接口
export const cancelGoods = params => {
    return post('/api/mygoods/quxiaoshenhe', Qs.stringify(params))
}

// 代收款列表接口
export const getMyDskList = params => {
    return post('/api/orders/dsk_list', Qs.stringify(params))
}

// 代收款详细信息接口
export const getMyDskInfo = params => {
    return post('/api/orders/dsk_view', Qs.stringify(params))
}

// 代收款确认收款接口
export const getMyDskQuer = params => {
    return post('/api/orders/dsk_queren', Qs.stringify(params))
}

// ----------------------------------------------------------我的商品接口结束





// ----------------------------------------------------------统计分析接口开始

// 统计分析接口
export const getTongJi = params => {
    return post('/api/tongji/index_tongji', Qs.stringify(params))
}

// ----------------------------------------------------------统计分析接口结束




// ----------------------------------------------------------我的团队接口开始

// 我的团队接口
export const getTeam = params => {
    return post('/api/usercenter/my_team', Qs.stringify(params))
}

// ----------------------------------------------------------我的团队接口结束





// ----------------------------------------------------------地址管理接口开始

// 地址管理列表接口
export const getUserReceiving = params => {
    return post('/api/usercenter/list_user_receiving', Qs.stringify(params))
}

// 获取默认地址接口
export const getUserChecked = params => {
    return post('/api/usercenter/get_checked_user_receiving', Qs.stringify(params))
}

// 添加地址接口
export const addUserReceiving = params => {
    return post('/api/usercenter/add_user_receiving', Qs.stringify(params))
}

// 修改信息接口
export const setUserReceiving = params => {
    return post('/api/usercenter/up_user_receiving', Qs.stringify(params))
}

// 删除信息接口
export const delUserReceiving = params => {
    return post('/api/usercenter/delete_user_receiving', Qs.stringify(params))
}

// ----------------------------------------------------------地址管理接口结束






// ----------------------------------------------------------成为店长接口开始

// 成为店长接口
export const addShopowner = params => {
    return post('/api/dianzhang/shenqing', Qs.stringify(params))
}

// ----------------------------------------------------------成为店长接口结束